import Router from 'koa-router';
import proxyService from '../../common/proxyService';
import { accountRecordAgent, accountExpendAgent } from '../../api/agent';

const router = new Router();

router.get('/record', async ctx => {
  const response = await proxyService.postProxy(ctx, accountRecordAgent);
  return (ctx.body = response);
});

router.get('/expend', async ctx => {
  const response = await proxyService.postProxy(ctx, accountExpendAgent);
  return (ctx.body = response);
});

export default router;
